package breaking;

import base.DreamScript;
import base.DreamUtility;

public class LogoutHandler extends DreamUtility {

	public LogoutHandler(DreamScript cs) {
		super(cs);
	}

	public void logout() throws InterruptedException {
		logout(false);
	}

	public void logout(boolean shutdown) throws InterruptedException {
		if (cs.theBank.isInterfaceUp()) {
			cs.theBank.exit();
		}

		cs.theTabs.Logout.clickLogOut();
	}

	public boolean isLoggedIn() throws InterruptedException {
		return cs.theLoggedInTest.isLoggedIn();
	}
}
